<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
	
<%
	request.setCharacterEncoding("UTF-8");
	String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
	String path3 = request.getContextPath();
	String basePath3 = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path3 + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="<%=path3%>/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path3%>/CSS/backLayout.css">
<link rel="stylesheet" type="text/css" href="<%=path3%>/CSS/bombBox.css">
</head>
<style>
select{width: 234px;height: 31px}
.gn_name{padding-top: 5px}
.div_zilei{width: 100%;padding-left: 90px;height: 30px}
.tr{height:40px;background: #a9bbe0}
.tr td{font-size: 14px;color: #ffffff}
.tr_td{height: 40px;}
.tr_td td{border-bottom: 1px solid #ededed;text-align: center;}
tr td:nth-child(1) {font-size: 14px;color: #cccccc}
.date{border: 0;background: #ffffff;text-align: center;}
.tr_td td:nth-child(1){border-left: 1px solid #cccccc;}
.tr_td td:nth-child(3){border-right: 1px solid #cccccc;}
.addTable.deleteTable:HOVER{cursor:pointer;}
input[type='checkbox']{width: 15px}
.fseq2{border: none;color: #cccccc;text-align: center;}

.subtn3,.subtn4,.subtn5,.subtn6{
	background: #57a0ff, background;
	border-radius: 50px;
	background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
	background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
	background: linear-gradient(top, #57a0ff, #57a1ff);
	background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
	border: 1px solid #2576A8;
	box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
	color: #fff;
	height: 40px;
	text-shadow: 1px 1px 0.5px #22629B;
	outline: none;
}
.findBtn3 ,.findBtn4,.findBtn5,.findBtn6{
	background: #427dff, background;
	border-radius: 50px;
	background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
	background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
	background: linear-gradient(top, #57a0ff, #57a1ff);
	background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
	border: 1px solid #2576A8;
	box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
	color: #fff;
	height: 40px;
	text-shadow: 1px 1px 0.5px #57a0ff;
	outline: none;
	margin-left: 100px
}
 .modal-data3 {
			  visibility: hidden; 
			  z-index: 1001;
			  width: 70%;
			  min-height: 500px;
			  margin:100px -130px;
			  background-color: #FFFFFF;
			 /* border: 1px solid #C80B14;*/
			 -moz-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
        	 -webkit-box-shadow:0 10px 20px #8AC1E2 inset,0 -10px 0 #57a0ff inset;
      /*         box-shadow:0 0 10px #cccccc; 
			  box-shadow: #cccccc; */
			  box-shadow: 0 10px 20px #57a1ff inset,0 -10px 0 #57a0ff inset;
			  padding: 5px;
			  text-align: center;
			  position: fixed;
			  left: 22%;
		}
		
		.modal-data3 td{padding-left: 15px;padding-right: 15px}
		.modal-data3 tr:FIRST-CHILD td{padding: 0px 10px;}
		.modal-data3 tr{padding-top: 30px}
		.modal-data3 form table {
			margin: 0px
		} 
.modal-data4 ,.modal-data6{
	visibility: hidden;
	z-index: 1001;
	min-height: 500px;
	margin: 100px auto;
	background-color: #FFFFFF;
	-moz-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
	-webkit-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
	box-shadow: 0 10px 20px #57a1ff inset, 0 -10px 0 #57a0ff inset;
	padding: 5px;
	text-align: center;
	position: fixed;
	left: 22%;
}
.modal-data4 td{padding-left: 15px;padding-right: 15px}
		.modal-data4 tr:FIRST-CHILD td{padding: 0px 10px;}
		.modal-data4 tr{padding-top: 30px}
		.modal-data4 form table {
			margin: 0px
		} 
</style>
<body style="background: #f5f5f5">

<div id="modal-overlay">
			    
		</div>
				
		<div class="modal-data3">
			<div style="height: 60px">
				<ul>
					<li
						style="text-align: left; margin-left: 60px; height: 40px; line-height: 40px">
						<span>名称：</span> <span> <input class="name3" type="text" style="width: 150px;">
					</span> <span>
							<button class="findBtn3">查询</button>
					</span>
					</li>
				</ul>
			</div>
			<div style=" height: 350px; overflow: scroll;">
				<form action="">
					<table class="head3"
						style="width:auto; white-space: nowrap; border-spacing: 0px">
						<tr style="background: #f2f2f2; height: 30px; line-height: 20px;"
							class="sel">
							<td style="width: 20px"></td>
							<td>员工编号</td>
							<td>员工姓名</td>
							<td>部门</td>
							<td>员工类型</td>
							<td>身份证号码</td>
							<td>手机号码</td>
							<td>地址</td>
							<td>出生日期</td>
							<td>入职日期</td>
							<td>转正日期</td>
							<td>离职日期</td>
							<td>合同到期日</td>
							<td>社保编号</td>
							<td>车辆</td>
							<td>性别</td>
							<td>职级职等</td>
							<td>薪酬调整</td>
							<td>岗位异动</td>
							<td>请假记录</td>
							<td>违纪奖励记录</td>
							<td>社会保险记录</td>
							<td>计算招生提成</td>
							<td>计算培训提成</td>
						</tr>
						<c:forEach items="${persons}" var="persons" varStatus="s">
							<tr style="margin-top: 45px" class="jx">
								<td><input type="checkbox" class="check"
									value="${persons.fid}" name="person" /></td>
								<td>${persons.fnumber}</td>
								<td>${persons.fnameL2}</td>
								<td>${persons.cfpersondepName}</td>
								<c:if test="${empty persons.cfpersontype}">
									<td></td>
								</c:if>
								<c:if test="${persons.cfpersontype == '0'}">
									<td></td>
								</c:if>
								<c:if test="${persons.cfpersontype == '1'}">
									<td>办公室职员</td>
								</c:if>
								<c:if test="${persons.cfpersontype == '2'}">
									<td>教练</td>
								</c:if>
								<c:if test="${persons.cfpersontype == '3'}">
									<td>其他</td>
								</c:if>
								<td>${persons.cfidcardno}</td>
								<td>${persons.cfcell}</td>
								<td>${persons.cfaddress}</td>
								<td>${persons.cfbirthdays}</td>
								<td>${persons.cfbegindate}</td>
								<td>${persons.cfstartdate}</td>
								<td>${persons.cfenddate}</td>
								<td>${persons.cfhtdqsj}</td>
								<td>${persons.cfaccountsno}</td>
								<td>${persons.cfcarName}</td>
								<c:if test="${empty persons.cfsex}">
									<td></td>
								</c:if>
								<c:if test="${persons.cfsex == '1'}">
									<td>男</td>
								</c:if>
								<c:if test="${persons.cfsex == '2'}">
									<td>女</td>
								</c:if>
								<td>${persons.positiongradeName}</td>
								<td>${persons.cfxctz}</td>
								<td>${persons.cfgwyd}</td>
								<td>${persons.cfqjjl}</td>
								<td>${persons.cfwjjljl}</td>
								<td>${persons.cfshjljl}</td>
								<c:if test="${empty persons.cfzstc}">
									<td><input type="checkbox" disabled="disabled"></td>
								</c:if>
								<c:if test="${persons.cfzstc == '0'}">
									<td><input type="checkbox" disabled="disabled"></td>
								</c:if>
								<c:if test="${persons.cfzstc == '1'}">
									<td><input type="checkbox" disabled="disabled"
										checked="checked"></td>
								</c:if>
								<c:if test="${empty persons.cfpxtc}">
									<td><input type="checkbox" disabled="disabled"></td>
								</c:if>
								<c:if test="${persons.cfpxtc == '0'}">
									<td><input type="checkbox" disabled="disabled"></td>
								</c:if>
								<c:if test="${persons.cfpxtc == '1'}">
									<td><input type="checkbox" disabled="disabled"
										checked="checked"></td>
								</c:if>
							</tr>
						</c:forEach>
					</table>

					<input type="hidden" class="type">
				</form>
			</div>
			<button class="subtn3"
				style="width: 200px; position: absolute; bottom: 25px; font-size: 16px; left: 170px">
				确定</button>
			<button class="btn"
				style="width: 200px; position: absolute; bottom: 25px; font-size: 16px; right: 170px">
				关闭</button>
		</div>
		
		
</body>
<script type="text/javascript" src="<%=path3%>/JQuery/jquery-1.8.2.js"></script>
<script type="text/javascript" src="<%=path3%>/HoganJS/handlebars-v4.0.11.js"></script>
<script type="text/javascript">

  //单击职员
 $(".jx td").live('click',function(){
    $('input:checkbox[name=person]:checked').each(function(i) {   	
    	$(this).removeAttr("checked");
     });
       $(this).parent().find("input:checkbox[name=person]").attr('checked','checked');
  }) 
/* //双击确定职员数据
$(document).on('dblclick','.jx td',function(){
	 var fid;//fid
 	 var name;//名称
		 $('input:checkbox[name=person]:checked').each(function (i) {
			  if (0 == i) {
				 fid = $(this).val();
	        	 name = $(this).parent().next().next().text();
			   } 
		 });
		 if(trainName != null ){
	 		 trainName.val(name)
	 		 trainName.next().val(fid);
	 		 trainName = null;//清空教练对象
	 		 $('#modal-overlay').css('visibility','hidden')
	 		 $('.modal-data3').css('visibility','hidden')
	 	 }else{
	 		 personData(fid,name); 
	 	 }
}) */


//根据姓名查询加油人员
$(".findBtn3").click(function(){
	var name = $(".name3").val();
	$.ajax({
		url:'<%=path3%>/DrivingSys/quePersonByName', 
	    type: "post",
	    data:{'name':name},
	    dataType:"json",
	    success:function(json){
	    	var str = '';
	    	for (var i = 0; i < json.length; i++) {
	    		str += '<tr style="margin-top: 45px;height: 30px;" class="jx"><td><input style="width: 15px;height: 15px" '
		  	         str+='type="checkbox" name="person"  value="'+json[i].fid+'"></td>'
					if (json[i].fnumber == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].fnumber + '</td>'
					}
					if (json[i].fnameL2 == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].fnameL2 + '</td>'
					}
					if (json[i].cfpersondepName == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfpersondepName + '</td>'
					}
					if (json[i].cfpersontype == '1') {
						str += '<td>办公室职员</td>'
					} else if (json[i].cfpersontype == '2') {
						str += '<td>教练</td>'
					} else if (json[i].cfpersontype == '3') {
						str += '<td>其他</td>'
					} else {
						str += '<td></td>'
					}
					if (json[i].cfidcardno == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfidcardno + '</td>'
					}
					if (json[i].cfcell == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfcell + '</td>'
					}
					if (json[i].cfaddress == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfaddress + '</td>'
					}
					if (json[i].cfbirthdays == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfbirthdays + '</td>'
					}
					if (json[i].cfbegindate == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfbegindate + '</td>'
					}
					if (json[i].cfstartdate == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfstartdate + '</td>'
					}
					if (json[i].cfenddate == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfenddate + '</td>'
					}
					if (json[i].cfhtdqsj == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfhtdqsj + '</td>'
					}
					if (json[i].cfhtdqsj == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfaccountsno + '</td>'
					}
					if (json[i].cfcarName == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfcarName + '</td>'
					}
					if (json[i].cfsex == '1') {
						str += '<td>男</td>'
					} else if (json[i].cfsex == '2') {
						str += '<td>女</td>'
					} else {
						str += '<td></td>'
					}
					if (json[i].positiongradeName == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].positiongradeName + '</td>'
					}
					if (json[i].cfxctz == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfxctz + '</td>'
					}
					if (json[i].cfgwyd == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfgwyd + '</td>'
					}
					if (json[i].cfqjjl == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfqjjl + '</td>'
					}
					if (json[i].cfwjjljl == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfwjjljl + '</td>'
					}
					if (json[i].cfshjljl == null) {
						str += '<td></td>'
					} else {
						str += '<td>' + json[i].cfshjljl + '</td>'
					}
					if (json[i].cfzstc == '0') {
						str += '<td><input type="checkbox" disabled="disabled"></td>'
					} else if (json[i].cfzstc == '1') {
						str += '<td><input type="checkbox" disabled="disabled" checked="checked"></td>'
					} else {
						str += '<td><input type="checkbox" disabled="disabled"></td>'
					}
					if (json[i].cfpxtc == '1') {
						str += '<td><input type="checkbox" disabled="disabled" checked="checked"></td>'
					} else {
						str += '<td><input type="checkbox" disabled="disabled"></td>'
					}
					str += '</tr>';	     	
	    	}
	    	$(".head3 tr:not(':first')").remove()
			$('.head3').append(str)
	   },  
			error: function(){alert('错误！！！');} 
	})
})


</script>
</html>